package me.zhengjie.modules.utils.test;

import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class A0112Thread {

    public static void main(String[] args) {
        //new线程池时，线程中无线程
        ThreadPoolExecutor executor = new ThreadPoolExecutor(10,20,0L, TimeUnit.MILLISECONDS,
        new LinkedBlockingQueue<>(), Executors.defaultThreadFactory(),new ThreadPoolExecutor.AbortPolicy());

        executor.execute(new Runnable() {
            @Override
            public void run() {
                System.out.println("业务流程");
            }
        });


//        executor.shutdown();
//        executor.shutdownNow();
    }}
